﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;
using System.Configuration;

namespace Arch.IoC
{
    public static class UnityContainerExtentions
    {
        public static IUnityContainer AutoConfigure(this IUnityContainer container)
        {
            var section = (UnityConfigurationSection)ConfigurationManager.GetSection("unity");
            if (section != null)
                section.Configure(container);
            return container;
        }
    }
}
